
#ifndef _Explosion_H_
#define _Explosion_H_

#include "WorldObject.h"
#include "Utils/Vector2D.h"
#include "Graphics/ParticleSystem/ParticleSystem.h"
#include "Graphics/ParticleSystem/ParticleEmitter.h"
#include <string>


class Explosion : public WorldObject {
  public:
    Explosion(unsigned num_particles, 
              Vector2D position, Vector2D velocity_bias,
              float emit_rand_min, float emit_rand_max,
              float col_r, float col_g, float col_b,
              float size, float duration,
              std::string texture = "");

    ~Explosion();

    void render(void);
    void update(void);
    bool active(void);

    bool resolveCollision(Ship *ship);
    bool resolveCollision(Weapon *weapon);
    bool resolveCollision(Map *map);

    WorldObjectType getObjectType(void) const { return EXPLOSION_WOBJECT; }

  private:
    ParticleSystem *explosion_psys;
    ParticleEmitter *explosion_emitter;

};


#endif

